package com.beyond.trace.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;

/**
 * 产品证书信息对象 t_trace_product_certificate
 * 
 * @author yao
 * @date 2022-03-02
 */
@Data
@TableName("t_trace_product_certificate")
public class TraceProductCertificate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "certificate_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long certificateId;

    /** 认证机构 */
    @Excel(name = "认证机构")
    @ApiModelProperty(value = "认证机构")
    @NotEmpty(message = "认证机构不能为空")
    private String certificateOrgan;

    /** 产品 */
    @Excel(name = "产品")
    @ApiModelProperty(value = "产品")
    @NotEmpty(message = "产品不能为空")
    private String certificateProduct;

    /** 认证日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "认证日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "认证日期")
    private Date certificateProvideTime;

    /** 图片 */
    @Excel(name = "图片")
    @ApiModelProperty(value = "图片")
    private String certificatePic;

    /** 证明人 */
    @Excel(name = "证明人")
    @ApiModelProperty(value = "证明人")
    private String certificatePerson;

    /** 证明人联系方式 */
    @Excel(name = "证明人联系方式")
    @ApiModelProperty(value = "证明人联系方式")
    private String certificatePersonPhone;

    @Excel(name = "部门id")
    @ApiModelProperty(value = "部门id")
    @JsonIgnore
    private String departId;

    @Excel(name = "官网链接")
    @ApiModelProperty(value = "官网链接")
    private String websiteUrl;

    /** 产品名称 */
    @TableField(exist = false)
    private String productName;

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public void setCertificateId(Long certificateId) 
    {
        this.certificateId = certificateId;
    }

    public Long getCertificateId() 
    {
        return certificateId;
    }
    public void setCertificateOrgan(String certificateOrgan) 
    {
        this.certificateOrgan = certificateOrgan;
    }

    public String getCertificateOrgan() 
    {
        return certificateOrgan;
    }
    public void setCertificateProduct(String certificateProduct) 
    {
        this.certificateProduct = certificateProduct;
    }

    public String getCertificateProduct() 
    {
        return certificateProduct;
    }
    public void setCertificateProvideTime(Date certificateProvideTime) 
    {
        this.certificateProvideTime = certificateProvideTime;
    }

    public Date getCertificateProvideTime() 
    {
        return certificateProvideTime;
    }
    public void setCertificatePic(String certificatePic) 
    {
        this.certificatePic = certificatePic;
    }

    public String getCertificatePic() 
    {
        return certificatePic;
    }
    public void setCertificatePerson(String certificatePerson) 
    {
        this.certificatePerson = certificatePerson;
    }

    public String getCertificatePerson() 
    {
        return certificatePerson;
    }
    public void setCertificatePersonPhone(String certificatePersonPhone) 
    {
        this.certificatePersonPhone = certificatePersonPhone;
    }

    public String getCertificatePersonPhone() 
    {
        return certificatePersonPhone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("certificateId", getCertificateId())
            .append("certificateOrgan", getCertificateOrgan())
            .append("certificateProduct", getCertificateProduct())
            .append("certificateProvideTime", getCertificateProvideTime())
            .append("certificatePic", getCertificatePic())
            .append("certificatePerson", getCertificatePerson())
            .append("certificatePersonPhone", getCertificatePersonPhone())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
